home *** CD-ROM | disk | FTP | other *** search
- /* SaveListText(list, fname)
-
- Create a file of the given name containing the text of the items on
- the list.
- */
-
- call beginprompt('Working...')
-
- if gettype(arg(1)) ~= 'List' then do
- say 'Object must be a list'
- exit
- end
-
- if open(wfile,arg(2),'write') then do
- do i = 1 to numelements(arg(1))
- call writeln(wfile,getitemtext(objectnumber(arg(1), i)))
- end
- call close(wfile)
- end
- else
- say 'Couldn''t open file!'
-